/**
 * 项目名称（软件名称）：忠旺机械物资管理系统(mms)
 * 研发设计单位：忠旺机械设备制造有限公司机械设计院智能控制设计科设计与研发。
 * 版权所有：忠旺机械设备制造有限公司
 * 注：本项目的一切技术专利，使用规范归解释权由忠旺机械设备制造有限公司所有。
 * 软件版本：Ver 1.0.0
 * 文件路径：com.zhongwang.mms.module.overview.service
 * 创建时间：2020年05月23日 18时08分
 **/
package com.zhongwang.mms.module.overview.service;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.zhongwang.mms.base.BaseService;
import com.zhongwang.mms.common.JsonResult;
import com.zhongwang.mms.gen.entity.PInventory;
import com.zhongwang.mms.gen.entity.TWarehouseInfo;
import com.zhongwang.mms.gen.entity.User;
import com.zhongwang.mms.module.overview.dao.OverStatisticalDao;
import com.zhongwang.mms.module.overview.model.statistical.MatYingKouInvClassDetailsModel;
import com.zhongwang.mms.module.overview.model.statistical.MonthlyReceiptPlanModel;
import com.zhongwang.mms.module.overview.model.statistical.PurDataModel;
import com.zhongwang.mms.module.overview.model.statistical.SteelProductsDataModel;
import com.zhongwang.mms.module.overview.model.statisticalReport.StatisticsOfSteelInStockDataModel;
import com.zhongwang.mms.module.overview.model.statisticalReport.projectRemainingAmountQueryModel;
import com.zhongwang.mms.module.purchase.dao.PurChangeDao;
import com.zhongwang.mms.module.purchase.dao.PurPInventoryDao;
import com.zhongwang.mms.module.purchase.dao.PurWarQueryDao;
import com.zhongwang.mms.module.purchase.model.*;
import com.zhongwang.mms.module.system.log.LogService;
import com.zhongwang.mms.util.FileUtils;
import com.zhongwang.mms.util.ShiroUtils;
import lombok.extern.log4j.Log4j2;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * @ClassName： OverStatisticalService
 * @Description： 统计报表业务逻辑层
 * @Author： 徐一贺
 * @Date： 2020/5/23 18:08
 * @Version： V1.0
 **/
@Service
@Log4j2
public class OverStatisticalService extends BaseService {
    @Autowired
    private OverStatisticalDao overStatisticalDao;
    @Autowired
    private PurPInventoryDao purPInventoryDao;
    @Autowired
    private PurWarQueryDao purWarQueryDao;
    @Autowired
    private PurChangeDao purChangeDao;
    @Value("${user.upload.path}")
    private String uploadPath;

    /**
     * @FunctionName: projectRemainingAmountQueryList
     * @Description: 项目剩余金额列表
     * @DesignIdea: 项目剩余金额列表
     * @Author: 徐一贺
     * @CreateDate: 2020/6/23 13:50
     * @Phone: 18241927380
     * @Param: [param] 搜索参数
     * @Return: com.zhongwang.mms.common.JsonResult
     * @Throw:
     * @Version: v 1.0.0
     */
    public List<projectRemainingAmountQueryModel> projectRemainingAmountQueryList(projectRemainingAmountQueryModel param) {
        List<projectRemainingAmountQueryModel> list = null;
        try {
            list = overStatisticalDao.projectRemainingAmountQueryList(param);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return list;
    }

    /**
     * @FunctionName: getPurData
     * @Description: 获取外购件模块数据
     * @DesignIdea: 获取外购件模块数据
     * @Author: 徐一贺
     * @CreateDate: 2020/6/23 15:55
     * @Phone: 18241927380
     * @Param: []
     * @Return: com.zhongwang.mms.common.JsonResult
     * @Throw:
     * @Version: v 1.0.0
     */
    public JsonResult getPurData() {
        JsonResult jsonResult = new JsonResult();
        try {
            PurDataModel purDataModel = new PurDataModel();
            purDataModel.setProjectRemainingAmountQuery(overStatisticalDao.getProjectRemainingAmountQuery());
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setData(purDataModel);
        } catch (Exception e) {
            e.printStackTrace();
            jsonResult.setType(JsonResult.ResultType.ERROR);
        }
        return jsonResult;
    }

    /**
     * @FunctionName: projectRemainingAmountQueryList
     * @Description: 项目剩余金额列表导出
     * @DesignIdea: 项目剩余金额列表导出
     * @Author: 徐一贺
     * @CreateDate: 2020年7月2日10:23:11
     * @Phone: 18241927380
     * @Param: [param] 搜索参数
     * @Return: com.zhongwang.mms.common.JsonResult
     * @Throw:
     * @Version: v 1.0.0
     */
    public void exportExcel(HttpServletResponse response, projectRemainingAmountQueryModel param) {
        try {
            List<projectRemainingAmountQueryModel> list = new ArrayList<>();
            User user = (User) SecurityUtils.getSubject().getPrincipal();
            String path = uploadPath + user.getAccount() + "/";
            Subject userSubject = ShiroUtils.getSubject();
            //1.创建临时内存表名
            String tempTableName = "##" + ShiroUtils.getUser().getAccount() + (UUID.randomUUID().toString().replace("-", ""));
            param.setTempTableName(tempTableName);
            //2.查询出数据导入到临时表
            overStatisticalDao.createProAmountTempTable(param);
            //3.查询临时内存表数据数量
            Integer dataCount = overStatisticalDao.getProAmountTempTableDataCount(param);
            int step = 5000;
            FileUtils.mkdirs(path);
            // 方法1 如果写到同一个sheet
            path = path + "项目剩余金额查询.xls";
            ExcelWriter excelWriter = null;
            try {
                // 这里 需要指定写用哪个class去写
                excelWriter = EasyExcel.write(path, projectRemainingAmountQueryModel.class).build();
                // 这里注意 如果同一个sheet只要创建一次
                WriteSheet writeSheet = EasyExcel.writerSheet("sheet1").build();
                for (int topCount = 5000, notHaveTopCount = 0; notHaveTopCount < dataCount; notHaveTopCount += step) {
                    param.setTopCount(topCount);
                    param.setNotHaveTopCount(notHaveTopCount);
                    list = overStatisticalDao.selectProAmountTempTableByParam(param);
//                if (userSubject.isPermitted("overview:staproductionamount:view")) {
//                    list = overStatisticalDao.selectProAmountTempTableByParam(param);
//                } else {
//                    list = overStatisticalDao.selectProAmountTempTableByParamAndNoAmount(param);
//                }

                    if (list != null) {
                        excelWriter.write(list, writeSheet);
                    }
                }
                //4.删除临时内存表
                overStatisticalDao.dropProAmountTempTable(tempTableName);
            } finally {
                // 千万别忘记finish 会帮忙关闭流
                if (excelWriter != null) {
                    excelWriter.finish();
                }
            }
            //5.下载
            FileUtils.downloadFile(path, response);
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    /**
     * 根据ID们获取库存中金额总数
     *
     * @param whiIds
     * @return
     */
    public String getPInventoryTotalPriceByWhiIds(String whiIds) {
        return purPInventoryDao.getPInventoryTotalPriceByWhiIds(whiIds);
    }

    /**
     * 获取机械备件库在库明细以及总金额页面列表
     *
     * @param param
     * @return
     */
    public List<PurInvQueryModel> findPurInvList(PurInvQueryModel param) {
        return purPInventoryDao.findPurInvList(param);
    }

    /**
     * 列表
     * 暂缓项目在库明细及总金额页面列表数据
     *
     * @param param 查询条件
     * @return list
     */
    public List<PurInvQueryModel> findPurInvPostponeList(PurInvQueryModel param) {
        return purPInventoryDao.findPurInvPostponeList(param);
    }

    /**
     * 机械备件库划项目明细以及总金额页面列表数据
     *
     * @param param
     * @return
     */
    public List<PurInvQueryModel> findPurInvProList(PurInvQueryModel param) {
        return purPInventoryDao.findPurInvProList(param);
    }

    /**
     * 机械备件库划项目总金额
     * 筛选条件提供方：物控科
     * 筛选条件：无跟踪号，有项目名和项目编码
     *
     * @param whiIds
     * @return
     */
    public String getPInventoryTotalPriceByWhiIdsForInvToPro(String whiIds) {
        return purPInventoryDao.getPInventoryTotalPriceByWhiIdsForInvToPro(whiIds);
    }

    /**
     * 暂缓项目总金额
     * 筛选条件提供方：物控科
     * 筛选条件：有跟踪号，有项目名和项目编码
     *
     * @param whiIds
     * @return
     */
    public String getPInventoryTotalPriceByWhiIdsForInvForPostpone(String whiIds) {
        return purPInventoryDao.getPInventoryTotalPriceByWhiIdsForInvForPostpone(whiIds);
    }

    /**
     * 机械备件库月出库金额
     *
     * @param whiIds
     * @return
     */
    public String mevMonthOut(String whiIds) {
        return purPInventoryDao.mevMonthOut(whiIds);
    }

    /**
     * 机械备件库月入库金额
     *
     * @param whiIds
     * @return
     */
    public String mevMonthIn(String whiIds) {
        return purPInventoryDao.mevMonthIn(whiIds);
    }

    /**
     * 外购件库
     * 当前月出库金额汇总及明细
     *
     * @param param 查询条件
     * @return list
     */
    public List<PurWarQueryModel> findPurWarList(PurWarQueryModel param) {
        return purWarQueryDao.findPurWarList(param);
    }

    /**
     * 外购件库
     * 当前月入库金额汇总及明细
     *
     * @param param 查询条件
     * @return list
     */
    public List<PurWarQueryModel> purInWarQueryList(PurWarQueryModel param) {
        return purWarQueryDao.purInWarQueryList(param);
    }

    /**
     * 物控科
     * 月消耗营口库存明细及金额
     *
     * @param whiIds 查询条件
     * @return list
     */
    public String monthlyConsumptionOfYingkouInventoryAndAmount(String whiIds) {
        return purWarQueryDao.getMonthlyConsumptionOfYingkouInventoryAndAmount(whiIds);
    }

    /**
     * 执行定时计划
     */
    @Transactional(rollbackFor = Exception.class)
    public void execStatisticalPlan(String tableName) {
        long startTime = System.currentTimeMillis();
        Date currentTime = new Date();
        //1.统计在建项目钢材（吨）
        overStatisticalDao.execTotalSteelUnderConstructionPlan(tableName, currentTime);
        //2.统计暂缓项目钢材（吨）
        overStatisticalDao.execTotalSteelPostponePlan(tableName, currentTime);
        //3.统计机械常用备件（吨）
        overStatisticalDao.execMechanicalSpareParts(tableName, currentTime);
        //4.统计本月提报计划（吨）
        overStatisticalDao.execReportPlan(tableName, currentTime);
        //5.统计本月入库（吨）
        overStatisticalDao.execInRawMaterial(tableName, currentTime);
        //6.统计本月出库（吨）
        overStatisticalDao.execOutRawMaterial(tableName, currentTime);
        //7.生产状态暂缓和完成金额（电气件、液压件和机械件金额总和）
        overStatisticalDao.execTotalAmountOfElectricalHydraulicAndMechanicalPartsWhoseProductionStatusIsPostponedAndCompleted(tableName, currentTime);
        //8.生产状态暂缓和完成电气件金额
        overStatisticalDao.execTotalAmountOfElectricalPartsWithProductionStatusSuspendedAndCompleted(tableName, currentTime);
        //9.生产状态暂缓和完成液压件金额
        overStatisticalDao.execTotalAmountOfHydraulicPartsWithProductionStatusSuspendedAndCompleted(tableName, currentTime);
        //10.生产状态暂缓和完成机械件金额
        overStatisticalDao.execTotalAmountOfMechanicalPartsWithProductionStatusSuspendedAndCompleted(tableName, currentTime);
        //11.项目在建（生产状态制作中和待制作）金额（电气件、液压件和机械件金额总和）
        overStatisticalDao.execTotalAmountOfElectricalHydraulicAndMechanicalPartsWhoseProductionStatusIsProjectUnderConstruction(tableName, currentTime);
        //12.生产状态制作中和待制作电气件金额
        overStatisticalDao.execTotalAmountOfElectricalPartsWithProductionStatusProjectUnderConstruction(tableName, currentTime);
        //13.生产状态制作中和待制作液压件金额
        overStatisticalDao.execTotalAmountOfHydraulicPartsWithProductionStatusProjectUnderConstruction(tableName, currentTime);
        //14.生产状态制作中和待制作机械件金额
        overStatisticalDao.execTotalAmountOfMechanicalPartsWithProductionStatusProjectUnderConstruction(tableName, currentTime);
        //15.车间计划金额(成本中心)
        overStatisticalDao.execTotalAmountOfCostProject(tableName, currentTime);
        //16.物资在库金额（生产状态暂缓和完成金额+项目在建金额）
        overStatisticalDao.execTotalAmountOfPur(tableName, currentTime);
        //17.营口机械备件库库存金额
        overStatisticalDao.execTotalAmountOfYingKou(tableName, currentTime);
        //18.营口机械备件库库存金额-库存在库
        overStatisticalDao.execTotalAmountOfYingKouOnStock(tableName, currentTime);
        //19.营口机械备件库库存金额-项目在库
        overStatisticalDao.execTotalAmountOfYingKouOnProject(tableName, currentTime);
        //20.辽阳机械备件库库存金额
        overStatisticalDao.execTotalAmountOfHalf(tableName, currentTime);
        //21.机械备件库库存金额-库存在库
        overStatisticalDao.execTotalAmountOfHalfOnStock(tableName, currentTime);
        //22.机械备件库库存金额-项目在库
        overStatisticalDao.execTotalAmountOfHalfOnProject(tableName, currentTime);
        //22.总金额
        overStatisticalDao.execTotalAmountOf(tableName, currentTime);
        //20.外购件库存消耗-消耗暂缓项目（'A060',
        //            'A061',
        //            'A062',
        //            'A064',
        //            'A065',
        //            'A066',
        //            'A067',
        //            'A068',
        //            'A093',
        //            '机械备件库' 执行和出库）- 数量
        overStatisticalDao.execInventoryConsumptionOfPurchasedPartsByDeferredItemsCount(tableName, currentTime);
        //21.外购件库存消耗-消耗暂缓项目（'A060',
        //        //            'A061',
        //        //            'A062',
        //        //            'A064',
        //        //            'A065',
        //        //            'A066',
        //        //            'A067',
        //        //            'A068',
        //        //            'A093',
        //        //            '机械备件库' 执行和出库）- 金额
        overStatisticalDao.execInventoryConsumptionOfPurchasedPartsByDeferredItemsAmount(tableName, currentTime);
        //22.外购件库存消耗-消耗库房（机械备件库库存划项目执行）- 数量
        overStatisticalDao.execConsumptionWarehouseCount(tableName, currentTime);
        //22.外购件库存消耗-消耗库房（机械备件库库存划项目执行）- 金额
        overStatisticalDao.execConsumptionWarehouseAmount(tableName, currentTime);
        //23.月收到提报计划统计(与SAP无端口，无法实现，因提报计划和采购计划是多对多的关系)
        long endTime = System.currentTimeMillis();
        float excTime = (float) (endTime - startTime) / 1000;
        System.out.println("执行时间：" + excTime + "s");
        System.out.println("执行完毕");

    }


    /**
     * 获取钢材在库统计表数据
     *
     * @param param
     * @return JsonResult 数据
     */
    public JsonResult getStatisticsOfSteelInStockData(StatisticsOfSteelInStockDataModel param) {
        JsonResult jsonResult = new JsonResult();
        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findStatisticsOfSteelInStockData(param);
        param.setMonth(param.getMonth() - 1);
        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findStatisticsOfSteelInStockData(param);
        if (afterList.size() == 0 && beforeList.size() > 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据，故无法进行环比,是否直接获取当前数据进行环比？");
        } else if (afterList.size() > 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
        } else if (afterList.size() == 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
        } else {
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setMsg("获取数据成功，请查看数据。");
            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
            result.setBeforeList(beforeList);
            result.setAfterList(afterList);
            jsonResult.setData(result);
        }
        return jsonResult;
    }

    /**
     * 获取物资在库金额统计表数据
     *
     * @param param
     * @return JsonResult 数据
     */
    public JsonResult getMaterialInStockData(StatisticsOfSteelInStockDataModel param) {
        JsonResult jsonResult = new JsonResult();
        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findMaterialInStockData(param);
        List<StatisticsOfSteelInStockDataModel> beforeList = new ArrayList<>();
        if (param.getMonth() == 1) {
            param.setMonth(12);
            param.setYear(param.getYear() - 1);
            beforeList = overStatisticalDao.findMaterialInStockData(param);
        } else {
            param.setMonth(param.getMonth() - 1);
            beforeList = overStatisticalDao.findMaterialInStockData(param);
        }
        if (afterList.size() == 0 && beforeList.size() > 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据，故无法进行环比！");
        } else if (afterList.size() > 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
        } else if (afterList.size() == 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
        } else {
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setMsg("获取数据成功，请查看数据。");
            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
            result.setBeforeList(beforeList);
            result.setAfterList(afterList);
            jsonResult.setData(result);
        }
        return jsonResult;
    }

    /**
     * 获取月消耗暂缓项目库存明细及金额表数据
     *
     * @param param
     * @return JsonResult 数据
     */
    public JsonResult getInventoryDetailsAndAmountOfMonthlyConsumptionDeferredItemsData(StatisticsOfSteelInStockDataModel param) {
        JsonResult jsonResult = new JsonResult();
        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findInventoryDetailsAndAmountOfMonthlyConsumptionDeferredItemsData(param);
        param.setMonth(param.getMonth() - 1);
        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findInventoryDetailsAndAmountOfMonthlyConsumptionDeferredItemsData(param);
        if (afterList.size() == 0 && beforeList.size() > 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据，故无法进行环比,是否直接获取当前数据进行环比？");
        } else if (afterList.size() > 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
        } else if (afterList.size() == 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
        } else {
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setMsg("获取数据成功，请查看数据。");
            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
            result.setBeforeList(beforeList);
            result.setAfterList(afterList);
            jsonResult.setData(result);
        }
        return jsonResult;
    }

    /**
     * 获取月消耗库房库存明细及金额表数据
     *
     * @param param
     * @return JsonResult 数据
     */
    public JsonResult getMonthlyConsumptionWarehouseInventoryDetailsAndAmountData(StatisticsOfSteelInStockDataModel param) {
        JsonResult jsonResult = new JsonResult();
        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findMonthlyConsumptionWarehouseInventoryDetailsAndAmountData(param);
        param.setMonth(param.getMonth() - 1);
        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findMonthlyConsumptionWarehouseInventoryDetailsAndAmountData(param);
        if (afterList.size() == 0 && beforeList.size() > 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据，故无法进行环比,是否直接获取当前数据进行环比？");
        } else if (afterList.size() > 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
        } else if (afterList.size() == 0 && beforeList.size() == 0) {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
        } else {
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setMsg("获取数据成功，请查看数据。");
            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
            result.setBeforeList(beforeList);
            result.setAfterList(afterList);
            jsonResult.setData(result);
        }
        return jsonResult;
    }

//    /**
//     * 获取月消耗库房库存明细及金额表数据
//     *
//     * @param param
//     * @return JsonResult 数据
//     */
//    public JsonResult getMonthlyConsumptionWarehouseInventoryDetailsAndAmountDataByNowData(StatisticsOfSteelInStockDataModel param) {
//        JsonResult jsonResult = new JsonResult();
//        String tempTableName = "timing_task_data" + UUID.randomUUID().toString().replace("-", "");
//        overStatisticalDao.createTempTable(tempTableName);
//        execStatisticalPlan(tempTableName);
//        param.setTempTableName(tempTableName);
//        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findMonthlyConsumptionWarehouseInventoryDetailsAndAmountDataByNowData(param);
//        param.setMonth(param.getMonth() - 1);
//        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findMonthlyConsumptionWarehouseInventoryDetailsAndAmountData(param);
//        if (afterList.size() == 0 && beforeList.size() > 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据，故无法进行环比,是否直接获取当前数据进行环比？");
//        } else if (afterList.size() > 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
//        } else if (afterList.size() == 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
//        } else {
//            jsonResult.setType(JsonResult.ResultType.SUCCESS);
//            jsonResult.setMsg("获取数据成功，请查看数据。");
//            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
//            result.setBeforeList(beforeList);
//            result.setAfterList(afterList);
//            jsonResult.setData(result);
//        }
//        return jsonResult;
//    }

//    /**
//     * 获取月消耗暂缓项目库存明细及金额表数据 现在
//     *
//     * @param param
//     * @return JsonResult 数据
//     */
//    public JsonResult getInventoryDetailsAndAmountOfMonthlyConsumptionDeferredItemsDataByNow(StatisticsOfSteelInStockDataModel param) {
//        JsonResult jsonResult = new JsonResult();
//        String tempTableName = "timing_task_data" + UUID.randomUUID().toString().replace("-", "");
//        overStatisticalDao.createTempTable(tempTableName);
//        execStatisticalPlan(tempTableName);
//        param.setTempTableName(tempTableName);
//        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findInventoryDetailsAndAmountOfMonthlyConsumptionDeferredItemsDataByNow(param);
//        param.setMonth(param.getMonth() - 1);
//        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findInventoryDetailsAndAmountOfMonthlyConsumptionDeferredItemsData(param);
//        if (afterList.size() == 0 && beforeList.size() > 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据，故无法进行环比,是否直接获取当前数据进行环比？");
//        } else if (afterList.size() > 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
//        } else if (afterList.size() == 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
//        } else {
//            jsonResult.setType(JsonResult.ResultType.SUCCESS);
//            jsonResult.setMsg("获取数据成功，请查看数据。");
//            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
//            result.setBeforeList(beforeList);
//            result.setAfterList(afterList);
//            jsonResult.setData(result);
//        }
//        return jsonResult;
//    }

//    /**
//     * 获取物资在库金额统计表数据 现在
//     *
//     * @param param
//     * @return JsonResult 数据
//     */
//    public JsonResult getMaterialInStockDataByNowData(StatisticsOfSteelInStockDataModel param) {
//        JsonResult jsonResult = new JsonResult();
//        String tempTableName = "timing_task_data" + UUID.randomUUID().toString().replace("-", "");
//        overStatisticalDao.createTempTable(tempTableName);
//        execStatisticalPlan(tempTableName);
//        param.setTempTableName(tempTableName);
//        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findMaterialInStockDataByNow(param);
//        param.setMonth(param.getMonth() - 1);
//        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findMaterialInStockData(param);
//        if (afterList.size() == 0 && beforeList.size() > 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据，故无法进行环比！");
//        } else if (afterList.size() > 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
//        } else if (afterList.size() == 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
//        } else {
//            jsonResult.setType(JsonResult.ResultType.SUCCESS);
//            jsonResult.setMsg("获取数据成功，请查看数据。");
//            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
//            result.setBeforeList(beforeList);
//            result.setAfterList(afterList);
//            jsonResult.setData(result);
//        }
//        return jsonResult;
//    }

//    /**
//     * 获取钢材在库统计表数据现在的数据
//     *
//     * @param param
//     * @return JsonResult 数据
//     */
//    public JsonResult getStatisticsOfSteelInStockDataByNowData(StatisticsOfSteelInStockDataModel param) {
//        JsonResult jsonResult = new JsonResult();
//        String tempTableName = "timing_task_data" + UUID.randomUUID().toString().replace("-", "");
//        overStatisticalDao.createTempTable(tempTableName);
//        execStatisticalPlan(tempTableName);
//        param.setTempTableName(tempTableName);
//        List<StatisticsOfSteelInStockDataModel> afterList = overStatisticalDao.findStatisticsOfSteelInStockDataByNow(param);
//        overStatisticalDao.removeTempTable(tempTableName);
//        param.setMonth(param.getMonth() - 1);
//        List<StatisticsOfSteelInStockDataModel> beforeList = overStatisticalDao.findStatisticsOfSteelInStockData(param);
//        if (afterList.size() == 0 && beforeList.size() > 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据，故无法进行环比!");
//        } else if (afterList.size() > 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无前一月份数据，故无法进行环比！");
//        } else if (afterList.size() == 0 && beforeList.size() == 0) {
//            jsonResult.setType(JsonResult.ResultType.ERROR);
//            jsonResult.setMsg("无此月份数据和此月份之前月份的数据，故无法进行环比！");
//        } else {
//            jsonResult.setType(JsonResult.ResultType.SUCCESS);
//            jsonResult.setMsg("获取数据成功，请查看数据。");
//            StatisticsOfSteelInStockDataModel result = new StatisticsOfSteelInStockDataModel();
//            result.setBeforeList(beforeList);
//            result.setAfterList(afterList);
//            jsonResult.setData(result);
//        }
//        return jsonResult;
//    }

    /**
     * 获取月消耗暂缓项目库存明细
     *
     * @param param year年 month月
     * @return JsonResult 数据
     */
    public JsonResult getMaterialInStockInfoData(StatisticsOfSteelInStockDataModel param) {
        JsonResult jsonResult = new JsonResult();
        List<ChangeModel> infoList = purChangeDao.findMaterialInStockInfoData(param);
        if (infoList.size() > 0) {
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setData(infoList);
            jsonResult.setMsg("获取明细成功！");
        } else {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("暂无明细");
        }
        return jsonResult;
    }

    /**
     * 月消耗库房库存明细及金额明细
     *
     * @param param year年 month月
     * @return JsonResult 数据
     */
    public JsonResult getMonthlyConsumptionWarehouseInventoryDetailsAndAmountInfo(StatisticsOfSteelInStockDataModel param) {
        JsonResult jsonResult = new JsonResult();
        List<PInventoryProjectMarkModel> infoList = purChangeDao.findMonthlyConsumptionWarehouseInventoryDetailsAndAmountInfo(param);
        if (infoList.size() > 0) {
            jsonResult.setType(JsonResult.ResultType.SUCCESS);
            jsonResult.setData(infoList);
            jsonResult.setMsg("获取明细成功！");
        } else {
            jsonResult.setType(JsonResult.ResultType.ERROR);
            jsonResult.setMsg("暂无明细");
        }
        return jsonResult;
    }

    /**
     * 月收到提报计划统计
     *
     * @return java.util.List 数据
     */
    public List<MonthlyReceiptPlanModel> monthlyReceiptPlanList() {
        return overStatisticalDao.monthlyReceiptPlanList();
    }

    /**
     * findPurResidueList 项目剩余金额列表
     *
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PInventoryModel> 列表
     * @author 徐一贺
     * @date 2020/11/28 14:48
     */
    public List<PInventoryModel> findPurResidueList(PInventoryModel param) {
        try {
            return overStatisticalDao.findPurResidueList(param);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return overStatisticalDao.findPurResidueList(param);
    }

    /**
     * matYingKouInvClassDetailsList 库存分类明细
     *
     * @return java.util.List<com.zhongwang.mms.module.overview.model.statistical.MatYingKouInvClassDetailsModel>
     * @author 徐一贺
     * @date 2021/1/8 14:07
     */
    public List<MatYingKouInvClassDetailsModel> matYingKouInvClassDetailsList() {
        return overStatisticalDao.findMatYingKouInvClassDetailsList();
    }

    /**
     * findRelatedReportsOfPurchasedPartsInMaterialSystemToSapOnStockTotalPriceList SAP在库总金额 列表 库位 A060---A093（大前提条件）
     *
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/21 16:15
     */
    public List<PurInvQueryModel> findRelatedReportsOfPurchasedPartsInMaterialSystemToSapOnStockTotalPriceList(PurInvQueryModel param) {
        return overStatisticalDao.findRelatedReportsOfPurchasedPartsInMaterialSystemToSapOnStockTotalPriceList(param);
    }

    /**
     * findRelatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnInvTotalPriceList SAP库存在库金额 列表 库位 A060---A093 项目状态 完成 无状态（不包含库位A068  项目编码为成本中心（不包含140000））
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 8:10
     */
    public List<PurInvQueryModel> findRelatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnInvTotalPriceList(PurInvQueryModel param) {
        return overStatisticalDao.findRelatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnInvTotalPriceList(param);
    }

    /**
     * relatedReportsOfPurchasedPartsInMaterialSystemToSapOnStockTotalPriceGetTotalPrice SAP在库总金额 库位 A060---A093（大前提条件）
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/21 16:29
     */
    public BigDecimal relatedReportsOfPurchasedPartsInMaterialSystemToSapOnStockTotalPriceGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.relatedReportsOfPurchasedPartsInMaterialSystemToSapOnStockTotalPriceGetTotalPrice(param);
    }

    /**
     * findRelatedReportsOfPurchasedPartsInMaterialSystemToSapWorkingOnProjectTotalPriceList  SAP在干项目在库总金额 列表 库位 A060---A093 项目状态 制作中和待制作
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/21 16:38
     */
    public List<PurInvQueryModel> findRelatedReportsOfPurchasedPartsInMaterialSystemToSapWorkingOnProjectTotalPriceList(PurInvQueryModel param) {
        return overStatisticalDao.findRelatedReportsOfPurchasedPartsInMaterialSystemToSapWorkingOnProjectTotalPriceList(param);
    }

    /**
     * relatedReportsOfPurchasedPartsInMaterialSystemToSapWorkingOnProjectTotalPriceGetTotalPrice SAP在干项目在库总金额 列表 库位 A060---A093 项目状态 制作中和待制作
     *
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/21 16:47
     */
    public BigDecimal relatedReportsOfPurchasedPartsInMaterialSystemToSapWorkingOnProjectTotalPriceGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.relatedReportsOfPurchasedPartsInMaterialSystemToSapWorkingOnProjectTotalPriceGetTotalPrice(param);
    }

    /**
     * relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnProjectTotalPriceList SAP暂缓项目在库总金额 库位 A060---A093 项目状态 暂缓
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/21 16:57
     */
    public List<PurInvQueryModel> findRelatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnProjectTotalPriceList(PurInvQueryModel param) {
        return overStatisticalDao.findRelatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnProjectTotalPriceList(param);
    }

    /**
     * relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnProjectTotalPriceGetTotalPrice     SAP暂缓项目在库总金额 库位 A060---A093 项目状态 暂缓
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 7:57
     */
    public BigDecimal relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnProjectTotalPriceGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnProjectTotalPriceGetTotalPrice(param);
    }

    /**
     * relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnInvTotalPriceListGetTotalPrice SAP库存在库金额 列表 库位 A060---A093 项目状态 完成 无状态（不包含库位A068  项目编码为成本中心（不包含140000））
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 8:24
     */
    public BigDecimal relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnInvTotalPriceGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.relatedReportsOfPurchasedPartsInMaterialSystemToSapStopOnInvTotalPriceGetTotalPrice(param);
    }

    /**
     * findRelatedReportsOfPurchasedPartsInMaterialSystemToSapWorkShopOnInvTotalPriceList SAP库存在库金额 列表 库位 A060---A093 区位A068  项目编码为成本中心（不包含140000）
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 8:39
     */
    public List<PurInvQueryModel> findRelatedReportsOfPurchasedPartsInMaterialSystemToSapWorkShopOnInvTotalPriceList(PurInvQueryModel param) {
        return overStatisticalDao.findRelatedReportsOfPurchasedPartsInMaterialSystemToSapWorkShopOnInvTotalPriceList(param);
    }

    /**
     * relatedReportsOfPurchasedPartsInMaterialSystemToSapWorkShopOnInvTotalPriceGetTotalPrice 库位 A060---A093 区位A068  项目编码为成本中心（不包含140000）
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 8:43
     */
    public BigDecimal relatedReportsOfPurchasedPartsInMaterialSystemToSapWorkShopOnInvTotalPriceGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.relatedReportsOfPurchasedPartsInMaterialSystemToSapWorkShopOnInvTotalPriceGetTotalPrice(param);
    }

    /**
     * findTotalAmountOfMechanicalSparePartsInWarehouseList 库位  机械备件库和机械备件库营口（大前提条件）
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 8:53
     */
    public List<PurInvQueryModel> findTotalAmountOfMechanicalSparePartsInWarehouseList(PurInvQueryModel param) {
        return overStatisticalDao.findTotalAmountOfMechanicalSparePartsInWarehouseList(param);
    }

    /**
     * totalAmountOfMechanicalSparePartsInWarehouseGetTotalPrice 库位  机械备件库和机械备件库营口（大前提条件）
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 8:57
     */
    public BigDecimal totalAmountOfMechanicalSparePartsInWarehouseGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.totalAmountOfMechanicalSparePartsInWarehouseGetTotalPrice(param);
    }

    /**
     * findAmountOfMechanicalSparePartsInStockList 库位  机械备件库和机械备件库营口 项目状态 制作中 待制作（区位不包括消耗品、油漆库）
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 9:16
     */
    public List<PurInvQueryModel> findAmountOfMechanicalSparePartsInStockList(PurInvQueryModel param) {
        return overStatisticalDao.findAmountOfMechanicalSparePartsInStockList(param);
    }

    /**
     * amountOfMechanicalSparePartsInStockGetTotalPrice 库位  机械备件库和机械备件库营口 项目状态 制作中 待制作（区位不包括消耗品、油漆库）
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 9:19
     */
    public BigDecimal amountOfMechanicalSparePartsInStockGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.amountOfMechanicalSparePartsInStockGetTotalPrice(param);
    }

    /**
     * findAmountOfDeferredProjectInMechanicalSparePartsWarehouseList 机械备件库暂缓项目在库金额 库位  机械备件库和机械备件库营口 项目状态 暂缓 （区位不包括消耗品、油漆库）
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 9:28
     */
    public List<PurInvQueryModel> findAmountOfDeferredProjectInMechanicalSparePartsWarehouseList(PurInvQueryModel param) {
        return overStatisticalDao.findAmountOfDeferredProjectInMechanicalSparePartsWarehouseList(param);
    }

    /**
     * amountOfDeferredProjectInMechanicalSparePartsWarehouseGetTotalPrice 机械备件库暂缓项目在库金额 库位  机械备件库和机械备件库营口 项目状态 暂缓 （区位不包括消耗品、油漆库）
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 9:30
     */
    public BigDecimal amountOfDeferredProjectInMechanicalSparePartsWarehouseGetTotalPrice(PurInvQueryModel param) {
        return overStatisticalDao.amountOfDeferredProjectInMechanicalSparePartsWarehouseGetTotalPrice(param);
    }

    /**
     * findAmountOfMechanicalSparePartsInStock2ListList 机械备件库库存在库金额 库位  机械备件库和机械备件库营口 项目状态 完成 无状态（区位不包括消耗品、油漆库）
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 9:39
     */
    public List<PurInvQueryModel> findAmountOfMechanicalSparePartsInStock2ListList(PurInvQueryModel param) {
        return overStatisticalDao.findAmountOfMechanicalSparePartsInStock2ListList(param);
    }

    /**
     * amountOfMechanicalSparePartsInStock2GetTotalPrice 机械备件库库存在库金额 库位  机械备件库和机械备件库营口 项目状态 完成 无状态（区位不包括消耗品、油漆库）
     * 电气--19890373.7（区位筛选电气）
     * 机械=总-电气
     *
     * @param
     * @return java.util.Map<java.lang.String, java.math.BigDecimal>
     * @author 徐一贺
     * @date 2021/1/22 9:43
     */
    public Map<String, BigDecimal> amountOfMechanicalSparePartsInStock2GetTotalPrice(PurInvQueryModel param) {
        Map<String, BigDecimal> resultData = new HashMap<>();
        BigDecimal totalPrice = overStatisticalDao.amountOfMechanicalSparePartsInStock2GetTotalPrice(param);
        BigDecimal electricalTotalPrice = overStatisticalDao.amountOfMechanicalSparePartsInStock2GetElectricalTotalPrice(param);
        resultData.put("totalPrice", totalPrice);
        resultData.put("electrical", electricalTotalPrice);
        resultData.put("mechanics", totalPrice.subtract(electricalTotalPrice));
        return resultData;
    }

    /**
     * findAmountOfConsumablesInMechanicalSparePartsWarehouseList 机械备件库消耗品在库金额 库位  机械备件库和机械备件库营口 区位  消耗品
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 9:53
     */
    public List<PurInvQueryModel> findAmountOfConsumablesInMechanicalSparePartsWarehouseList(PurInvQueryModel param) {
        return overStatisticalDao.findAmountOfConsumablesInMechanicalSparePartsWarehouseList(param);
    }

    /**
     * amountOfConsumablesInMechanicalSparePartsWarehouseGetTotalPrice 机械备件库消耗品在库金额 库位  机械备件库和机械备件库营口 区位  消耗品
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 9:56
     */
    public Map<String, BigDecimal> amountOfConsumablesInMechanicalSparePartsWarehouseGetTotalPrice(PurInvQueryModel param) {
        Map<String, BigDecimal> resultData = new HashMap<>();
        resultData.put("totalPrice", overStatisticalDao.amountOfConsumablesInMechanicalSparePartsWarehouseGetTotalPrice(param));
        resultData.put("liaoYangTotalPrice", overStatisticalDao.amountOfConsumablesInMechanicalSparePartsWarehouseGetLiaoYangTotalPrice(param));
        resultData.put("yingKouTotalPrice", overStatisticalDao.amountOfConsumablesInMechanicalSparePartsWarehouseGetYingKouTotalPrice(param));
        return resultData;
    }

    /**
     * findAmountOfPaintInMechanicalSparePartsWarehouseList 机械备件库油漆在库金额 库位  机械备件库和机械备件库营口 区位  油漆库
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.module.purchase.model.PurInvQueryModel>
     * @author 徐一贺
     * @date 2021/1/22 10:03
     */
    public List<PurInvQueryModel> findAmountOfPaintInMechanicalSparePartsWarehouseList(PurInvQueryModel param) {
        return overStatisticalDao.findAmountOfPaintInMechanicalSparePartsWarehouseList(param);
    }

    /**
     * totalAmountOfMechanicalSparePartsInWarehouseGetTotal 库位  机械备件库和机械备件库营口 区位  油漆库
     *
     * @param
     * @return java.math.BigDecimal
     * @author 徐一贺
     * @date 2021/1/22 10:05
     */
    public Map<String, BigDecimal> amountOfPaintInMechanicalSparePartsWarehouseGetTotal(PurInvQueryModel param) {
        Map<String, BigDecimal> resultData = new HashMap<>();
        resultData.put("totalPrice", overStatisticalDao.amountOfPaintInMechanicalSparePartsWarehouseGetTotalPrice(param));
        resultData.put("liaoYangTotalPrice", overStatisticalDao.amountOfPaintInMechanicalSparePartsWarehouseGetLiaoYangTotalPrice(param));
        resultData.put("yingKouTotalPrice", overStatisticalDao.amountOfPaintInMechanicalSparePartsWarehouseGetYingKouTotalPrice(param));
        return resultData;
    }

    /**
     * getWarehouseList 获取仓库列表
     *
     * @param
     * @return java.util.List<com.zhongwang.mms.gen.entity.TWarehouseInfo>
     * @author 徐一贺
     * @date 2021/1/23 9:31
     */
    public List<TWarehouseInfo> getWarehouseList() {
        return overStatisticalDao.getWarehouseList();
    }


//    /**
//     * @FunctionName: getPurData
//     * @Description: 获取外购件模块数据
//     * @DesignIdea: 获取外购件模块数据
//     * @Author: 徐一贺
//     * @CreateDate: 2020年7月6日16:02:28
//     * @Phone: 18241927380
//     * @Param: []
//     * @Return: com.zhongwang.mms.common.JsonResult
//     * @Throw:
//     * @Version: v 1.0.0
//     */
//    public List<SteelProductsDataModel> getSteelProductsData(SteelProductsDataModel param) {
//        List<SteelProductsDataModel> list = new ArrayList<SteelProductsDataModel>();
//        SteelProductsDataModel totalAmountOfSteelInConstructionProjects = new SteelProductsDataModel();
//        totalAmountOfSteelInConstructionProjects.setItem("在建项目钢材总量");
//        totalAmountOfSteelInConstructionProjects.setCompared(overStatisticalDao.getTotalAmountOfSteelInConstructionProjectsByCompared(param));
//        totalAmountOfSteelInConstructionProjects.setCompare(overStatisticalDao.getTotalAmountOfSteelInConstructionProjectsByCompare(param));
//        return overStatisticalDao.getSteelProductsData(param);
//    }
}